﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using WalkingTec.Mvvm.Core;
using System.Text.Json.Serialization;
using TyMES.Model;
using TyMES.Model.BaseInformation;

namespace TyMES.Model.BaseInformation
{
    /// <summary>
    /// 工序管理
    /// </summary>
	[Table("T_Operations")]
    [SoftKey(nameof(Operation.OperationId))]
    [Display(Name = "_Model.Operation")]
    public class Operation : TopBasePoco
    {
        [Display(Name = "_Model._Operation._OperationId")]
        [Comment("工序编码")]
        [Required(ErrorMessage = "Validate.{0}required")]
        [CanNotEdit]
        public string OperationId { get; set; }
        [Display(Name = "_Model._Operation._OperationName")]
        [Comment("工序名称")]
        public string OperationName { get; set; }
        [Display(Name = "_Model._Operation._LineCode")]
        [Comment("产线信息")]
        [NotMapped]
        public Line LineCode { get; set; }
        [Display(Name = "_Model._Operation._LineCode")]
        [Required(ErrorMessage = "Validate.{0}required")]
        [Comment("产线信息")]
        public string LineCodeId { get; set; }

	}

}
